<!--底部操作栏-->
<script setup>
import {onMounted, ref} from 'vue';
import router from "../router/index.js";

let value = ref('label_1');
const list = ref([
  { value: 'label_1', icon: 'home', ariaLabel: '首页',path: '/' },
  { value: 'label_2', icon: 'app', ariaLabel: '类别',path: '/type' },
  { value: 'label_3', icon: 'chat', ariaLabel: '榜单' },
  { value: 'label_4', icon: 'user', ariaLabel: '我的',path: '/me' },
]);



const tz=(path)=>{
  localStorage.setItem("rr",path)
  let ii=localStorage.getItem("rr")
  router.push(path)
}

let rrr=localStorage.getItem("rr");

// onMounted(()=>{
//   if (rrr !== undefined && rrr != null){
//     localStorage.removeItem("rr")
//     router.push(rrr)
//   }else {
//     router.push("/")
//   }
// })

</script>

<template>
  <router-view/>
  <div style="margin-top: 10%"></div>
  <div style="position: absolute;">
    <t-tab-bar  theme="tag" :split="false" @change="change">
      <t-tab-bar-item v-for="item in list" :key="item.value" :value="item.value" @click="tz(item.path)">
        {{ item.ariaLabel }}
      </t-tab-bar-item>
    </t-tab-bar>
  </div>
</template>

<style scoped>

</style>